/**
 * @举例说明位运算符
 *
 * @author	 wangshikun <wangshikun2010@gmail.com>
 * @copyright	(c) 2012 wangshikun <wangshikun2010@gmail.com>
 * @license	http://www.opensource.org/licenses/mit-license.php The MIT License
 * @package	default
 * @subpackage	default
 */

#include <stdio.h>
#include <cs50.h>

int main(void) {
	unsigned int w1 = 0525u, w2 = 0707u, w3 = 0122u;

	printf("%o %o %o\n", w1 & w2, w1 | w2, w1 ^ w2);
	printf("%o %o %o\n", ~w1, ~w2, ~w3);
	printf("%o %o %o\n", w1 ^ w1, w1 & ~w2, w1 | w2 | w3);
	printf("%o %o\n", w1 | w2 & w3, w1 | w2 & ~w3);
	printf("%o %o \n", ~(~w1 & ~w2), ~(~w1 | ~w2));

	return 0;
}
